<template>
  <div>
    <ul>
      <li v-for="(item,index) in topics" :key="index">
        {{item.title}}
      </li>
    </ul>
  </div>
</template>

<script>
import axios from 'axios'
export default {
  async asyncData(){
    let res= await axios.get('https://cnodejs.org/api/v1/topics')
      return {
        topics:res.data.data
      }

  }
}
</script>